<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .aa{
            width: 300px;
            height: 500px;
        }
    </style>
</head>
<body>
    <button id="jay">周杰伦</button>
    <button id="eason">陈奕迅</button>
    <br/>
    <img src="../../../web/img/01.jpg" alt="" title="周杰伦" class="aa">
    <script>
        //  修改元素属性： ele.属性 = value 如 src，title ,id , name, href

        let jay=document.querySelector('#jay')
        let eason=document.querySelector('#eason')
        let img=document.querySelector('img')

        jay.onclick=function(){
            img.src='../../../web/img/01.jpg'
            img.title='周杰伦'
        }
        eason.onclick=function(){
            img.src='../../../web/img/02.jpg'
            img.title='陈奕迅'
        }
    </script>
</body>
</html>